![]() |
PATH![]() |
![]() ![]() |
Informs the Control Manager of the size of the content to which a control's size is proportioned.
pascal void SetControlViewSize (
ControlHandle theControl,
SInt32 newViewSize);
Your application should call the SetControlViewSize function to support proportional scroll boxes. If the user selects the systemwide Appearance preference for proportional scroll boxes and your application doesn't call SetControlViewSize , it will still have the traditional square scroll boxes.
To support a proportional scroll box, simply pass the size of the view area--in terms of whatever units the scroll bar uses--to SetControlViewSize . The system automatically handles resizing the scroll box, once your application supplies this information. Listing 1-1 in Creating a Proportional Scroll Box shows some typical code for setting a scroll bar according to a TextEdit handle, which includes making the scroll box proportional.